
<body>
<script type="text/javascript" src="http://gamehaynhat.com/template/braygames/js/jquery-1.8.1.min.js"></script>
<a href="http://gamehaynhat.com/x.html" id="clickerxx" >aaaaaaaa</a>

</body>
<script language="JavaScript">
var isShow = true;

/*
$('#klaka').live('click', function() { 
var win = window.open('http://gamehaynhat.com/','_blank'); 
});
$('#klaka').popupWindow({ 
windowURL:'http://code.google.com/p/swip/', 
windowName:'swip' 
}); 
$("#klaka").click();
*/

  window.onbeforeunload = function(e) {
	if(isShow){
		var win = window.open('http://gamehaynhat.com/','_blank'); 
		return 'Bạn có muốn tắt ?';
		// win.focus();
	}
};

$('a').live('click', function() { isShow = false; });
$('form').bind('submit', function() { isShow = false; });
$( "body" ).keydown(function(event ) {
if ( event.which == 116 ) {
  isShow = false;
  }
});

</script>
